package com.sunshine.controller.test;

import com.sunshine.bean.UserInfo;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by WeiHong on 2016/12/5.
 */
@Controller
public class LoginController {

    @RequestMapping(value = "/login")
    public String login(Model model, UserInfo info){
        model.addAttribute("username", info.getUsername());
        System.out.println(info.toString());
        return "success.jsp";
    }
}
